package com.template.server.common.security.session;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;

/**
 * @author liuxf
 * @date 2024/4/16
 */
@Slf4j
@Component
public class RedisSessionDao implements SessionDao {

    private final String keyPrefix = "auth-";

    private final int dayToExpire = 15;

    @Autowired
    private StringRedisTemplate redisTemplate;

    @Override
    public void save(Session session) {
        // redisTemplate.opsForValue().set();
    }

    @Override
    public boolean delete(Session session) {
        return false;
    }

    @Override
    public Session get(String key) {
        return null;
    }

    private void check(Session session) {

    }

}
